Cocaine dependence alone or co-occurring with opioid dependence is difficult to treat. We have reported reduced cocaine use in both populations using a potent agonist. Single dependence results have been confirmed by Australian colleagues. The proposed work follows from earlier studies. The theme is delineation of representative medications, doses and combinations for these difficult populations. Year I: We will continue preliminary small N evaluations to further evaluate dosing parameters. These will include combinations of d-amphetamine and modafinil, methadone and modafinil, and methadone and aripiprazole. Years II-V: We will conduct large RCT's, with continuing related small trials. Study I will include 200 consenting cocaine using subjects distributed across 4 groups: 1) 30 mg d-amphetamine+ 200 mg (estimate) modafinil; 2) 200 mg (est) modafinil; 3) 400 mg (est) modafinil; 4) placebo. Study II will include 200 consenting cocaine+opioid dependent subjects distributed across 5 groups all receiving up to1.2 mg/kg methadone/day. Groups will be: 1) 200 mg (est) modafinil; 2) 400 mg (est) modafinil; 3) 5 mg (est) aripiprazole; 4) 10 mg (est) aripiprazole; 5) placebo. Following consent, subjects will have complete medical and psychiatric evaluations, provide thrice weekly urine screens, weekly cognitive behavioral / relapse prevention based therapy, and regular monitoring with a standard measurement battery. Also, per Project 2, all consenting subjects will have fMRI at study entry and end.